<!-- 词云图 -->
<template>
  <div class="chartcontainer">
    <div :style="{'margin-bottom':'10px'}" v-if="title">{{title}}</div>
    <ve-wordcloud
      :data="list"
      width="100%"
      height="100%"
      :settings="chartSettings"
      :judge-width="true"
      :theme="theme"
    ></ve-wordcloud>
  </div>
</template>

<script>
import VeWordCloud from "v-charts/lib/wordcloud.common";

export default {
  props: [
    "diyposition",
    "chartData",
    "colors",
    "theme",
    "title",
    "field"
  ],
  data() {
    this.chartSettings = {
      sizeMin: 30,
      sizeMax: 60,
    };
    return {
      list: this.chartData
    };
  },
 watch: {
    chartData(newvalue) {
      this.list = newvalue;
    }
  },
  components: {},

  computed: {},

  methods: {}
};
</script>
<style scoped>
.chartcontainer {
  width: 100%;
  height: 100%;
}
</style>